package com.xypower;


import org.redisson.Redisson;
import org.redisson.config.Config;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;

@SpringBootApplication
public class TestApplication {
    public static void main(String[] args) {
        SpringApplication.run(TestApplication.class);
    }

    @Bean
    public Redisson redisson(){
        Config config = new Config();
        config.setUseLinuxNativeEpoll(true);
        config.useClusterServers()
                .addNodeAddress("127.0.0.1:7181");
        return (Redisson) Redisson.create(config);
    }
}
